package com.ztgf.pay.api.client;

import com.ztgf.common.constant.Result;
import com.ztgf.pay.models.service.IPayBankService;
import com.ztgf.pay.models.service.IReceiveNoticeService;
import com.ztgf.pay.models.vo.PayBankVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 用户信息表控制器
 *
 * @author mxli
 * @Date 2020-07-30 12:13:56
 */

@RestController
@RequestMapping("/api/payBank")
@Slf4j
@Api(value = "PayBankController",tags = "银行列表Api接口")
public class PayBankController {

    @DubboReference
    private IPayBankService payBankService;

    @PostMapping("/queryPageList")
    @ApiOperation(value = "分页获取银行列表",notes = "分页获取银行列表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "bankType",value = "UDK 查询支持绑定该行结算 账户的银行列表 U3B 查询支持开通快捷支付 业务的银行列表 U6G 查询支持企业网银支付 的银行列表 U6P 查询支持个人网银支付 的银行列表 ALL 查询全部银行列表",required = true,paramType = "query", dataType = "String")
    })
    public Result<List<PayBankVO>> queryPageList(HttpServletRequest request, HttpServletResponse response, String bankType){
        return payBankService.queryBankList(bankType);
    }

}
